import {Get,Controller} from '@nestjs/common';
import { AppService } from './app.service';//AppService.name
//spring mvc
@Controller('/')
export class AppController{
    //只要在构造函数里声明依赖,IOC容器会自动帮你注入实例进行,你直接 调用就可以了,不用自己 创建实例
    constructor(private appService: AppService){

    }
    @Get('/hello')//控制里面一般只用接收参数,返回响应,并不会真正业务
    hello(){
        let message = this.appService.getHello();
        return message;
    }
}